openCalendar Method |
This method shows the calendar based on the event on which it is called.
Syntax
calendarID.openCalendar(oElement, eventObject)
Parameters
Parameter |
Description |
|---|---|
oElement |
Required. Object that specifies the element to which the calendar component is associated. This is also called Parent Element and is usually a textbox. |
eventObject |
Required for the Firefox browser. Refers to the eventObject that invoked this method. For example, theonclickevent of a Button control. |
Remarks
This function is usually called on the onclick event of a button.
Example
The following example demonstrates the usage of the method.
<!-- calendar definition -->
<div cordysType="wcp.libaray.ui.Claendar " id="cal" style="position:absolute;display:none;width:150;height:137" >
</div>
<!-- Text box and calendar button -->
<input type="text" id="dateField">
<input type="button" onclick="cal.openCalendar(document.getElementById("dateField")">